-
Notifications
You must be signed in to change notification settings - Fork 903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve handling of bad versions during ext:install #5305
Conversation
Codecov ReportBase: 56.28% // Head: 56.30% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #5305 +/- ##
==========================================
+ Coverage 56.28% 56.30% +0.01%
==========================================
Files 310 310
Lines 20860 20863 +3
Branches 4236 4236
==========================================
+ Hits 11742 11747 +5
+ Misses 8101 8099 -2
Partials 1017 1017
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
src/extensions/extensionsHelper.ts
Outdated
@@ -834,13 +834,17 @@ export async function diagnoseAndFixProject(options: any): Promise<void> { | |||
* 2. Infer "latest" as the version if not provided | |||
*/ | |||
export async function canonicalizeRefInput(extensionName: string): Promise<string> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the word "name" has lost its value (at least to me...) consider naming this input
and the variable inferredRef
extensionVersion("0.1.0"), | ||
extensionVersion("0.1.1"), | ||
extensionVersion("0.2.0"), | ||
extensionVersion(), // Explicitly test that this doesn't break on bad data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 👍
Description
Noticed that ext:install was not working correctly for stripe/firestore-stripe-payments, because there was a badly formed extension in our backend that did not have a version number. I'm gonna investigate that, but figured I should also make this code less brittle.